package com.byb.server.service.dto;


import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;

/**
 * A DTO for the Rate entity.
 */
public class RateDTO implements Serializable {

    private Long id;

    private Integer age;

    private Float price;

    private Integer premiumPaymentPeriod;

    private Long productId;

    private Long sexId;

    private String sexSexName;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }

    public Integer getPremiumPaymentPeriod() {
        return premiumPaymentPeriod;
    }

    public void setPremiumPaymentPeriod(Integer premiumPaymentPeriod) {
        this.premiumPaymentPeriod = premiumPaymentPeriod;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getSexId() {
        return sexId;
    }

    public void setSexId(Long sexId) {
        this.sexId = sexId;
    }

    public String getSexSexName() {
        return sexSexName;
    }

    public void setSexSexName(String sexSexName) {
        this.sexSexName = sexSexName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        RateDTO rateDTO = (RateDTO) o;
        if(rateDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), rateDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "RateDTO{" +
            "id=" + getId() +
            ", age='" + getAge() + "'" +
            ", price='" + getPrice() + "'" +
            ", premiumPaymentPeriod='" + getPremiumPaymentPeriod() + "'" +
            ", sexId='" +getSexId() +"'"+
            ", sexSexName='" +getSexSexName() +"'"+
            "}";
    }
}
